body {
  background-color: #000;
}
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 50px;
}

.btn {
  position: relative;
  width: 200px;
  height: 80px;
  font-size: 40px;
  line-height: 2;
  text-align: center;
  color: #8de100;
  letter-spacing: 10px;
  overflow: hidden;
  cursor: pointer;
}
.btn span {
  position: absolute;
  display: block;
}
@keyframes animate1 {
  0% { left: -100%}
  50%,100% { left: 100% }
}
.btn span:nth-child(1) {
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg,transparent,#8de100);
  animation: animate1 1s linear infinite;
}

@keyframes animate2 {
  0% { top: -100%}
  50%,100% { top: 100% }
}
.btn span:nth-child(2) {
  top: -100%;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg,transparent,#8de100);
  animation: animate2 1s linear .25s infinite;
}
@keyframes animate3 {
  0% { right: -100%}
  50%,100% { right: 100% }
}
.btn span:nth-child(3) {
  bottom: 0;
  right: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(270deg,transparent,#8de100);
  animation: animate3 1s linear .5s infinite;
}
@keyframes animate4 {
  0% { bottom: -100%}
  50%,100% { bottom: 100% }
}
.btn span:nth-child(4) {
  bottom: -100%;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(360deg,transparent,#8de100);
  animation: animate4 1s linear .75s infinite;
}